from django.conf.urls.defaults import patterns, include, url


#urlpatterns = patterns('',
#    url(r'^$',include('xyh.oa.urls'))
#)

#
urlpatterns = patterns('xyh.oa.views.role.roleView',
    url(r'^role/toadd$','toAddRole'),
    url(r'^role/add$','addRole'),
    url(r'^role/list$','listRoles'),
    url(r'^role/del/(?P<role_id>\d+)$','delRole'),
    url(r'^role/update$','updateRole'),
    url(r'^role/menuconfig$','menuConfig'),
    url(r'^role/menu$','resetMenuConfig'),
)

#login
urlpatterns += patterns('xyh.oa.views.login',
    url(r'^login/$','login'),
    url(r'^logout/$','logout'),
    url(r'^header/$','header')
)

#Menu
urlpatterns += patterns('xyh.oa.views.menu.Menu',
    url(r'^menu/all/$','listMenus')
)

#contact
urlpatterns += patterns('xyh.oa.views.contact.Contact',
    url(r'^contact/types$','types'),
    url(r'^contact/list$','listContacts'),
    url(r'^contact/del/(?P<contact_id>\d+)$','delContact'),
    url(r'^contact/add$','addContact'),
    url(r'^contact/update$','updateContact'),
)

#container
urlpatterns += patterns('xyh.oa.views.Container',
    url(r'^container/list$','listall'),
    url(r'^container/del/(?P<container_id>\d+)$','delContainer'),
    url(r'^container/add$','addContainer'),
    url(r'^container/update$','updateContainer'),
)

#currency
urlpatterns += patterns('xyh.oa.views.Currency',
    url(r'^currency/list$','listall'),
    url(r'^currency/del/(?P<currency_id>\d+)$','delCurrency'),
    url(r'^currency/add$','addCurrency'),
    url(r'^currency/update$','updateCurrency'),
)

#feetype
urlpatterns += patterns('xyh.oa.views.Feetype',
    url(r'^feetype/list$','listall'),
    url(r'^feetype/del/(?P<feetype_id>\d+)$','delFeetype'),
    url(r'^feetype/add$','addFeetype'),
    url(r'^feetype/update$','updateFeetype'),
)

#Country
urlpatterns += patterns('xyh.oa.views.Country',
    url(r'^country/list$','listall'),
    url(r'^country/del/(?P<country_id>\d+)$','delCountry'),
    url(r'^country/add$','addCountry'),
    url(r'^country/update$','updateCountry'),
)

#Port
urlpatterns += patterns('xyh.oa.views.Port',
    url(r'^port/list$','listall'),
    url(r'^port/del/(?P<port_id>\d+)$','delPort'),
    url(r'^port/add$','addPort'),
    url(r'^port/update$','updatePort'),
)

#PackType
urlpatterns += patterns('xyh.oa.views.PackType',
    url(r'^packtype/list$','listall'),
    url(r'^packtype/del/(?P<packType_id>\d+)$','delPackType'),
    url(r'^packtype/add$','addPackType'),
    url(r'^packtype/update$','updatePackType'),
)

#User
urlpatterns += patterns('xyh.oa.views.User',
    url(r'^user/list$','listall'),
    url(r'^user/del/(?P<user_id>\d+)$','delUser'),
    url(r'^user/add$','addUser'),
    url(r'^user/update$','updateUser'),
    url(r'^user/roleconfig$','roleConfig'),
    url(r'^user/role$','resetRoleConfig'),
)

#Order
urlpatterns += patterns('xyh.oa.views.Order',
    url(r'^order/list$','listall'),
    url(r'^order/del/(?P<order_id>\d+)$','delOrder'),
    url(r'^order/add$','addOrder'),
    url(r'^order/update$','updateOrder'),
    url(r'^order/(?P<order_id>\d+)$','loadOrder'),
    url(r'^order/hbl/(?P<order_id>\d+)$','loadHbl'),
    url(r'^order/updatehbl','updateHbl'),
    url(r'^order/mbl/(?P<order_id>\d+)$','loadMbl'),
    url(r'^order/updatembl','updateMbl'),
    url(r'^order/bill/(?P<order_id>\d+)$','loadBill'),
    url(r'^order/bill/add$','addBill'),
    url(r'^order/bill/del/(?P<bill_id>\d+)$','delBill'),
    url(r'^order/exportbill/(?P<order_id>\d+)$','exportBill'),
    url(r'^order/exporthbl/(?P<order_id>\d+)$','exportHbl'),
    url(r'^order/exporthblusa/(?P<order_id>\d+)$','exportHblUsa'),
)